home *** CD-ROM | disk | FTP | other *** search
- Path: news.interlog.com!news
- From: object@interlog.com (Diogenes)
- Newsgroups: comp.lang.c++
- Subject: Re: Q. only for ostrstream experts!!!
- Date: Thu, 08 Feb 1996 14:00:30 GMT
- Organization: United Barrel Works
- Message-ID: <311a0158.581406@news.interlog.com>
- References: <4fab9d$1rp@fsuj01.rz.uni-jena.de>
- NNTP-Posting-Host: object.interlog.com
- X-Newsreader: Forte Agent .99d/32.182
-
- delete [] p;
-
- Without a doubt.
-
- mkt@isun04.inf.uni-jena.de (Tilo Koerbs) wrote:
-
- >
- >Consider:
- > ostrstream buf(); // dynamic buffer
- > buf << "something" << ends;
- > char *p = buf.str(); // freeze buffer and return a pointer to it
- >
- >Now: How do I delete the pointer p, using 'delete' or using 'delete[]'?
- >
- >Please: Post only an answer if you are really sure! And consider: Even different
- >books give different answers!
- >
- >So if you know a standard's paper or the description of the original
- >implementation or something else, please post!
- >
- >Thanks and bye.
- >Tilo Koerbs, mkt@uni-jena.de
- >
- >
-
-